package com.sgb.kjwl.model.entity.lease;

import android.text.TextUtils;

import com.chad.library.adapter.base.entity.MultiItemEntity;
import com.google.gson.annotations.SerializedName;
import com.swgk.core.base.model.entity.VideoBean;
import com.sgb.kjwl.model.entity.transport.SingleItemConstant;

import java.util.List;

public class AskLeaseSheBeiEntity implements MultiItemEntity {

    /**
     * createCompanyName : 武县市壹品文化创有限公司
     * contactPerson : 12
     * createType : 1
     * createUserName : 何彦军
     * remark : 13
     * categoryName : 工程设备
     * rentalTitle : 12
     * categoryParentId : 201906265110778
     * rentalSelectPrice : 元/台班
     * deleteStatus : 0
     * rentalQuotePeriod : 8
     * quotePersonCount : 1
     * categoryParentName : 临建设备吧
     * id : 5f0fdf4eb1876d34179ba587
     * categoryChildName : 移动折叠板房
     * rentalPrice : 12
     * rentalUnit : 台
     * publishTime : 2020-07-16 13:02:06
     * rentalDuration : 12
     * rentalCount : 12
     * createUserNo : 202006093615736
     * categoryChildId : 201906262531868
     * rentAddress : {"areaId":"110101","rentalAddress":"北京 / 北京市 / 东城区","cityId":"110100","provinceId":"110000"}
     * updateTime : 2020-07-16 13:02:06
     * useAndEnterTime : 2020-07-21
     * categoryType : 1
     * rentalPayMethod : 预付
     * createTime : 2020-07-16 13:02:06
     * createCompanyNo : 202006234546289
     * endTime : 2020-07-24 13:02:06
     * isDriver : 0
     * contactPhone : 13992775008
     * status : 1
     */

    private String createCompanyName;
    private String contactPerson;
    private int createType;
    private String createUserName;
    private String remark;
    private String categoryName;
    @SerializedName(value = "title", alternate = "rentalTitle")
    private String rentalTitle;
    private String categoryParentId;
    private int deleteStatus;
    private String rentalQuotePeriod;
    private int quotePersonCount;
    private String categoryParentName;
    @SerializedName(value = "no", alternate = {"id"})
    private String id;
    private String categoryChildName;
    @SerializedName(value = "priceUnitName", alternate = {"rentalSelectPrice", "priceUnit"})
    private String rentalSelectPrice;
    @SerializedName(value = "price", alternate = {"rentalPrice"})
    private String rentalPrice;
    private String rentalUnit;
    private String negotiable;//1面议,0非面议
    private String publishTime;
    private String publishTimeStr;
    private String rentalDuration;
    private String rentalDurationUnit;
    private String numOrArea;//数量+单位(求租兼容全部一个类别)
    private String rentalCount;
    private String rentalCountUnit;
    private String createUserNo;
    private String categoryChildId;
    //    private RentAddressBean rentAddress;
    @SerializedName(value = "updatetime", alternate = {"updateTime"})
    private String updateTime;
    private String useAndEnterTime;
    @SerializedName(value = "type", alternate = {"categoryType"})
    private String type;//1.机械,2.设备
    private String rentalPayMethod;
    private String createTime;
    private String createCompanyNo;
    private String endTime;
    private int isDriver;
    private String contactPhone;
    private int status;
    private String rentalArea;
    @SerializedName(value = "address", alternate = {"location"})
    private String location;//使用地区
    private String provinceId;
    private String provinceName;
    private String cityId;
    private String cityName;
    private String areaId;
    private String areaName;
    private String taskAddr;//详细地址
    private List<VideoBean> videoProDict;

    public List<VideoBean> getVideoProDict() {
        return videoProDict;
    }

    public void setVideoProDict(List<VideoBean> videoProDict) {
        this.videoProDict = videoProDict;
    }

    public String getLocation() {
        return location;
    }

    public void setLocation(String location) {
        this.location = location;
    }

    public String getProvinceId() {
        return provinceId;
    }

    public void setProvinceId(String provinceId) {
        this.provinceId = provinceId;
    }

    public String getProvinceName() {
        return provinceName;
    }

    public void setProvinceName(String provinceName) {
        this.provinceName = provinceName;
    }

    public String getCityId() {
        return cityId;
    }

    public void setCityId(String cityId) {
        this.cityId = cityId;
    }

    public String getCityName() {
        return cityName;
    }

    public void setCityName(String cityName) {
        this.cityName = cityName;
    }

    public String getAreaId() {
        return areaId;
    }

    public void setAreaId(String areaId) {
        this.areaId = areaId;
    }

    public String getAreaName() {
        return areaName;
    }

    public void setAreaName(String areaName) {
        this.areaName = areaName;
    }

    public String getTaskAddr() {
        return taskAddr;
    }

    public void setTaskAddr(String taskAddr) {
        this.taskAddr = taskAddr;
    }

    public String getRentalArea() {
        return rentalArea;
    }

    public void setRentalArea(String rentalArea) {
        this.rentalArea = rentalArea;
    }

    public String getRentalDurationUnit() {
        return rentalDurationUnit;
    }

    public void setRentalDurationUnit(String rentalDurationUnit) {
        this.rentalDurationUnit = rentalDurationUnit;
    }

    public String getCreateCompanyName() {
        return createCompanyName;
    }

    public void setCreateCompanyName(String createCompanyName) {
        this.createCompanyName = createCompanyName;
    }

    public String getContactPerson() {
        return contactPerson;
    }

    public void setContactPerson(String contactPerson) {
        this.contactPerson = contactPerson;
    }

    public int getCreateType() {
        return createType;
    }

    public void setCreateType(int createType) {
        this.createType = createType;
    }

    public String getCreateUserName() {
        return createUserName;
    }

    public void setCreateUserName(String createUserName) {
        this.createUserName = createUserName;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getCategoryName() {
        return categoryName;
    }

    public void setCategoryName(String categoryName) {
        this.categoryName = categoryName;
    }

    public String getRentalTitle() {
        return rentalTitle;
    }

    public void setRentalTitle(String rentalTitle) {
        this.rentalTitle = rentalTitle;
    }

    public String getCategoryParentId() {
        return categoryParentId;
    }

    public void setCategoryParentId(String categoryParentId) {
        this.categoryParentId = categoryParentId;
    }

    public String getRentalSelectPrice() {
        return rentalSelectPrice;
    }

    public void setRentalSelectPrice(String rentalSelectPrice) {
        this.rentalSelectPrice = rentalSelectPrice;
    }

    public int getDeleteStatus() {
        return deleteStatus;
    }

    public void setDeleteStatus(int deleteStatus) {
        this.deleteStatus = deleteStatus;
    }

    public int getQuotePersonCount() {
        return quotePersonCount;
    }

    public void setQuotePersonCount(int quotePersonCount) {
        this.quotePersonCount = quotePersonCount;
    }

    public String getCategoryParentName() {
        return TextUtils.isEmpty(categoryParentName) ? "" : categoryParentName;
    }

    public void setCategoryParentName(String categoryParentName) {
        this.categoryParentName = categoryParentName;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getCategoryChildName() {
        return TextUtils.isEmpty(categoryChildName) ? "" : categoryChildName;
    }

    public void setCategoryChildName(String categoryChildName) {
        this.categoryChildName = categoryChildName;
    }

    public String getRentalQuotePeriod() {
        return rentalQuotePeriod;
    }

    public void setRentalQuotePeriod(String rentalQuotePeriod) {
        this.rentalQuotePeriod = rentalQuotePeriod;
    }

    public String getRentalUnit() {
        return rentalUnit;
    }

    public void setRentalUnit(String rentalUnit) {
        this.rentalUnit = rentalUnit;
    }

    public String getPublishTime() {
        return publishTime;
    }

    public void setPublishTime(String publishTime) {
        this.publishTime = publishTime;
    }

    public String getPublishTimeStr() {
        return publishTimeStr;
    }

    public void setPublishTimeStr(String publishTimeStr) {
        this.publishTimeStr = publishTimeStr;
    }

    public String getNumOrArea() {
        return numOrArea;
    }

    public void setNumOrArea(String numOrArea) {
        this.numOrArea = numOrArea;
    }

    public String getRentalCount() {
        return rentalCount;
    }

    public void setRentalCount(String rentalCount) {
        this.rentalCount = rentalCount;
    }

    public String getRentalCountUnit() {
        return rentalCountUnit;
    }

    public void setRentalCountUnit(String rentalCountUnit) {
        this.rentalCountUnit = rentalCountUnit;
    }

    public String getCreateUserNo() {
        return createUserNo;
    }

    public void setCreateUserNo(String createUserNo) {
        this.createUserNo = createUserNo;
    }

    public String getCategoryChildId() {
        return categoryChildId;
    }

    public void setCategoryChildId(String categoryChildId) {
        this.categoryChildId = categoryChildId;
    }

    public String getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(String updateTime) {
        this.updateTime = updateTime;
    }

    public String getUseAndEnterTime() {
        return useAndEnterTime;
    }

    public void setUseAndEnterTime(String useAndEnterTime) {
        this.useAndEnterTime = useAndEnterTime;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getRentalPayMethod() {
        return rentalPayMethod;
    }

    public void setRentalPayMethod(String rentalPayMethod) {
        this.rentalPayMethod = rentalPayMethod;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public String getCreateCompanyNo() {
        return createCompanyNo;
    }

    public void setCreateCompanyNo(String createCompanyNo) {
        this.createCompanyNo = createCompanyNo;
    }

    public String getEndTime() {
        return endTime;
    }

    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }

    public int getIsDriver() {
        return isDriver;
    }

    public void setIsDriver(int isDriver) {
        this.isDriver = isDriver;
    }

    public String getContactPhone() {
        return contactPhone;
    }

    public void setContactPhone(String contactPhone) {
        this.contactPhone = contactPhone;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getRentalPrice() {
        return rentalPrice;
    }

    public void setRentalPrice(String rentalPrice) {
        this.rentalPrice = rentalPrice;
    }

    public String getRentalDuration() {
        return rentalDuration;
    }

    public void setRentalDuration(String rentalDuration) {
        this.rentalDuration = rentalDuration;
    }

    public String getNegotiable() {
        return negotiable;
    }

    public void setNegotiable(String negotiable) {
        this.negotiable = negotiable;
    }

    @Override
    public int getItemType() {
        //普通信息
        int itemType = SingleItemConstant.TYPE_ONE;
        if (videoProDict != null && videoProDict.size() == 1) {
            //视频单图
            itemType = SingleItemConstant.TYPE_THREE;
        } else if (videoProDict != null) {
            //视频多图
            itemType = SingleItemConstant.TYPE_TWO;
        }
        return itemType;
    }
}
